package org.scirp.ijmis.service.common.impl;

import java.util.List;

import org.scirp.ijmis.dao.common.IResearchFieldDAO;
import org.scirp.ijmis.po.common.ResearchField;
import org.scirp.ijmis.service.common.IResearchFieldService;

public class ResearchFieldServiceImpl implements IResearchFieldService {

	private IResearchFieldDAO researchFieldDAO;

	public List<ResearchField> selectAll() {

		return getResearchFieldDAO().selectAll();
	}

	public ResearchField selectById(Object id) {

		return getResearchFieldDAO().selectById(id);
	}


	public List<ResearchField> selectByJournalId(long journalId) {
		return researchFieldDAO.selectByJournalId(journalId);
	}
	
	public List<ResearchField> selectResearchFieldByJournalId(Long journalId){
		return researchFieldDAO.selectResearchFieldByJournalId(journalId);
	}
	@Override
	public boolean saveResearchField(ResearchField researchField) {
		return researchFieldDAO.saveResearchField(researchField);
	}
	@Override
	public boolean deleteResearchField(ResearchField researchField) {
		return researchFieldDAO.deleteResearchField(researchField);
	}
	public boolean deleteResearchFieldById(Long pid){
		return researchFieldDAO.deleteResearchFieldById(pid);
	}
	public List<ResearchField> selectResearchFieldByJournalIdAndResearchField(Long journalId,String researchfield) {
		return researchFieldDAO.selectResearchFieldByJournalIdAndResearchField(journalId, researchfield);
	}

	public void setResearchFieldDAO(IResearchFieldDAO researchFieldDAO) {
		this.researchFieldDAO = researchFieldDAO;
	}

	public IResearchFieldDAO getResearchFieldDAO() {
		return researchFieldDAO;
	}
}
